package com.windsea.relationshipmining.activity;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;

import com.windsea.relationshipmining.R;

public class ThankyouNoteDialog extends Dialog implements OnClickListener {

	Button uninstall;

	public ThankyouNoteDialog(Context context) {

		super(context);
		/** It will hide the title */
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.dialog_thankyounote);

		uninstall = (Button) findViewById(R.id.uninstall);
		uninstall.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		if (v == uninstall)
			dismiss();
		Uri packageURI = Uri.parse("package:com.windsea.relationshipmining");
		Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
		getContext().startActivity(uninstallIntent);

	}

}
